package com.drm.netschool.mapper;

import com.drm.netschool.entity.DrmSystemSetting;
import com.drm.netschool.entity.DrmSystemSettingExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DrmSystemSettingMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int countByExample(DrmSystemSettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int deleteByExample(DrmSystemSettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    @Delete({
        "delete from drm_system_setting",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    @Insert({
        "insert into drm_system_setting (id, website_name, ",
        "website_ico, website_meta, ",
        "wesite_metadesc, update_dt, ",
        "update_id, website_url, ",
        "website_logo, website_title)",
        "values (#{id,jdbcType=INTEGER}, #{websiteName,jdbcType=VARCHAR}, ",
        "#{websiteIco,jdbcType=VARCHAR}, #{websiteMeta,jdbcType=VARCHAR}, ",
        "#{wesiteMetadesc,jdbcType=VARCHAR}, #{updateDt,jdbcType=TIMESTAMP}, ",
        "#{updateId,jdbcType=BIGINT}, #{websiteUrl,jdbcType=VARCHAR}, ",
        "#{websiteLogo,jdbcType=VARCHAR}, #{websiteTitle,jdbcType=VARCHAR})"
    })
    int insert(DrmSystemSetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int insertSelective(DrmSystemSetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    List<DrmSystemSetting> selectByExample(DrmSystemSettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    @Select({
        "select",
        "id, website_name, website_ico, website_meta, wesite_metadesc, update_dt, update_id, ",
        "website_url, website_logo, website_title",
        "from drm_system_setting",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    DrmSystemSetting selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int updateByExampleSelective(@Param("record") DrmSystemSetting record, @Param("example") DrmSystemSettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int updateByExample(@Param("record") DrmSystemSetting record, @Param("example") DrmSystemSettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    int updateByPrimaryKeySelective(DrmSystemSetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_system_setting
     *
     * @mbggenerated Sat Aug 29 16:23:09 CST 2015
     */
    @Update({
        "update drm_system_setting",
        "set website_name = #{websiteName,jdbcType=VARCHAR},",
          "website_ico = #{websiteIco,jdbcType=VARCHAR},",
          "website_meta = #{websiteMeta,jdbcType=VARCHAR},",
          "wesite_metadesc = #{wesiteMetadesc,jdbcType=VARCHAR},",
          "update_dt = #{updateDt,jdbcType=TIMESTAMP},",
          "update_id = #{updateId,jdbcType=BIGINT},",
          "website_url = #{websiteUrl,jdbcType=VARCHAR},",
          "website_logo = #{websiteLogo,jdbcType=VARCHAR},",
          "website_title = #{websiteTitle,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(DrmSystemSetting record);
}